package com.homework;

public class Homework07 {
    public static void main(String[] args) {
        new Car(50).new Air().flow();
        new Car(-33).new Air().flow();
        new Car(34).new Air().flow();
    }
}


class Car {
    double temperature;

    public Car(double temperature) {
        this.temperature = temperature;
    }

    class Air {

        public Air(){}
        public void flow() {
            if (temperature > 40) {
                System.out.println("吹冷气");
            } else if (temperature < 0){
                System.out.println("吹暖气");
            } else {
                System.out.println("关掉空调");
            }
        }
    }

}
